package com.visikard.item;

import java.io.Serializable;

import org.json.JSONObject;

public class ItemRatingReview implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	int rating5 = 0;
	int rating4 = 0;
	int rating3 = 0;
	int rating2 = 0;
	int rating1 = 0;
	int total = 0;
	float ratingEverage = 0;

	public ItemRatingReview() {
	}

	public ItemRatingReview(JSONObject job) {
		if (job == null)
			return;
		try {
			rating5 = job.optInt("rating5", 0);
			rating4 = job.optInt("rating4", 0);
			rating3 = job.optInt("rating3", 0);
			rating2 = job.optInt("rating2", 0);
			rating1 = job.optInt("rating1", 0);
			total = job.optInt("total", 0);
			ratingEverage = job.optInt("ratingEverage", 0);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public int getRating5() {
		return rating5;
	}

	public void setRating5(int rating5) {
		this.rating5 = rating5;
	}

	public int getRating4() {
		return rating4;
	}

	public void setRating4(int rating4) {
		this.rating4 = rating4;
	}

	public int getRating3() {
		return rating3;
	}

	public void setRating3(int rating3) {
		this.rating3 = rating3;
	}

	public int getRating2() {
		return rating2;
	}

	public void setRating2(int rating2) {
		this.rating2 = rating2;
	}

	public int getRating1() {
		return rating1;
	}

	public void setRating1(int rating1) {
		this.rating1 = rating1;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public float getRatingEverage() {
		return ratingEverage;
	}

	public void setRatingEverage(float ratingEverage) {
		this.ratingEverage = ratingEverage;
	}

}
